package com.qst.survey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qst.survey.entity.UserReply;
import com.qst.survey.pojo.TopicData;
import org.apache.ibatis.annotations.Select;

/**
 * @Date: 2021/3/18 20:21
 * @Description: 用户回答问题映射类
 */
public interface UserReplyMapper extends BaseMapper<UserReply> {
    @Select("select user_reply.id, question_id, user_id, user.age\n" +
            "from user_reply,\n" +
            "     user\n" +
            "where user.id = user_reply.user_id\n" +
            "  and question_id=#{id}")
    public TopicData selectReply(Integer id);

}
